/**
* @author Ucar Sahin
*
* 31.05.2011
* ILoginServiceAsync.java
* 
*/

package at.fhv.easyDietWeb.client.loginService;

import at.fhv.easyDietWeb.shared.util.wrappers.UserWrapper;

import com.google.gwt.user.client.rpc.AsyncCallback;

/**
 * Corresponding asynchronous interface for the login 
 * @author Sahin
 *
 */
public interface ILoginServiceAsync
{
	/**
	 * tries to login at the server
	 * @param username username of the user
	 * @param pwd password of the user
	 * @param callback response of the server
	 * @throws IllegalArgumentException
	 */
	void validateLogin(String username, String pwd, AsyncCallback<UserWrapper> callback)
		throws IllegalArgumentException;
	
	/**
	 * asks the server for an existing login
	 * @param callback response of the server
	 */
	void checkSession(AsyncCallback<UserWrapper> callback);
}
